import pymysql
conn=pymysql.connect(user='root',
                     password='hhf20101',
                     host='localhost',
                     database='books')
cursor=conn.cursor()
cursor.execute("select * from t_book")
result1=cursor.fetchone()
print(result1)
result=cursor.fetchall()
print(result)
print(1111)
cursor.close()
conn.close()